<template>
  <ul class='text-list'>
    <li class='ellipsis'
        v-for="(item, index) in data"
        :key="index"
        :class="{No1: index === 0}"
        :title="item.name"
    >
      <router-link :to="geneDetailRoute(item.dataId)">
        {{item.name}}
      </router-link>
      <span></span>
    </li>
  </ul>
</template>

<script>
  import {geneDetailRoute, fieldState} from "@/mixins"

  export default {
    name: "textList",
    mixins: [geneDetailRoute, fieldState],
    props: {
      data: {
        type: Array,
        default: function () {
          return []
        }
      }
    },
    data() {
      return {

      }
    },
    computed: {
      firstData() {
        const vm = this;
        let item = null;
        if (vm.data && vm.data.length > 0) {
          item = vm.data[0];
        }
        return item;
      }
    }
  }
</script>

<style scoped>

</style>
